﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataAccess;
namespace tracnghiemonline2
{
    public partial class Result : System.Web.UI.Page
    {
        public int id;
        public string title;
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {

                id = int.Parse(RouteData.Values["id"].ToString());
                var get_result = new TblResultController().FetchAll().Where(x => x.ResultId == id).Single();
                var get_test = new TblTestController().FetchAll().Where(x => x.TestId == get_result.TestId).Single();
                title = get_test.TestTitle;
            }
            catch
            {
                Response.Redirect("~/Default.aspx");
            }
        }
    }
}